package icu.cocoon.work.entity.excel.weekReport;

import icu.cocoon.work.entity.WeekContentItem;
import lombok.Data;

@Data
public class ItemExcelData {

  private String content;

  private String planCompleteDate;

  private String realCompleteDate;

  private String reason;

  private String solution;

  private Integer score;

  public ItemExcelData(WeekContentItem item) {
    this.content = item.getContent();
    if (item.getPlanCompleteDate() != null) {
      this.planCompleteDate = item.getPlanCompleteDate().toString();
    }
    if (item.getRealCompleteDate() != null) {
      this.realCompleteDate = item.getRealCompleteDate().toString();
    }
    this.reason = item.getReason();
    this.solution = item.getSolution();
    this.score = item.getScore();
  }
}
